<template>
  <div>
    <v-header></v-header>
    <div>
    <div class="ris_cont">
      <!--左-->
      <div class="reg_left">
        <div class="ref_left_top">
          <p class=""></p>
          <span>登记列表</span>
        </div>
        <!--table页-->
        <ul class="table_page reg_tablePage">
          <li :class="registered?'':'table_page_active'" @click="registered=false"><img src="../../../static/img/register/jiantouBG_03.png"/>未登记</li>
          <li :class="registered?'table_page_active':''" @click="registered=true"><img src="../../../static/img/register/jiantouBG_03.png"/>已登记</li>
        </ul>
        <div class="reg_search">
          <table class="reg_search_table">
            <tr>
              <td v-text="registered?'登记时间：':'开单时间：'"></td>
              <td><input type="date" v-model="begintime" max="9999-12-31"></td>
              <td>至</td>
              <td><input type="date" v-model="endtime" max="9999-12-31"></td>
            </tr>
            <tr>
              <td>设备类型：</td>
              <td colspan="3">
                <select class="reg_search_select" v-model="eqptype">
                  <option :value="{code:'',name:''}"></option>
                  <option v-for="type in eqptypeList" :value="type">{{type.name}}</option>
                </select>
                <input type="text" class="reg_search_input" placeholder="请输入申请单号/姓名/拼音码查询" v-model="searchText"/>
                <img src="../../../static/img/register/fdjSearch_07.png" class="fdj_search" @click="search" style="cursor: pointer"/>
              </td>
            </tr>
          </table>
        </div>
        <div>
          <table class=" line_height_32 reg_table_cont">
            <thead>
            <tr>
              <th>姓名</th>
              <th>性别</th>
              <th>年龄</th>
              <th>申请单号</th>
              <th>门诊/住院号</th>
              <th>设备类型</th>
              <th v-text="registered?'登记时间：':'开单时间：'"></th>
            </tr>
            </thead>
          </table>
          <div class="table line_height_32 reg_table_cont_html scroll2">
            <table>
              <tbody>
              <tr v-for="pat in patInfoList" v-if="registered" @click="getPatInfoById(pat.id)" style="cursor: pointer">
                <td><span class="color_red" v-if="pat.emergstatus=='紧急'">[急]</span><span class="color_blur" v-else>[普]</span><span>{{pat.cname}}</span></td>
                <td>{{pat.sex}}</td>
                <td>{{pat.age}}</td>
                <td>{{pat.applyno}}</td>
                <td>{{pat.clinicno==""?pat.inhosno:pat.clinicno}}</td>
                <td>{{pat.eqptypename}}</td>
                <td>{{pat.regtimeStr}}</td>
              </tr>
              <tr v-for="pat in patBaseList" v-if="!registered" @dblclick="getPatBaseById(pat.id)" style="cursor: pointer">
                <td><span class="color_red" v-if="pat.emergstatus=='紧急'">[急]</span><span class="color_blur" v-else>[普]</span><span>{{pat.name}}</span></td>
                <td>{{pat.sex}}</td>
                <td>{{pat.age}}</td>
                <td>{{pat.applyno}}</td>
                <td>{{pat.clinicno==""?pat.inhosno:pat.clinicno}}</td>
                <td>{{pat.eqptype}}</td>
                <td>{{pat.applytimeStr}}</td>
              </tr>
              </tbody>
            </table>
          </div>
        </div>
      </div>
      <!--右-->
      <div class="reg_right">
        <div class="reg_right_head">人员详细登记表</div>
        <div class="reg_right_list" v-loading="false">
          <table class="reg_right_list_table line_height_30">
            <tr>
              <td>姓名<span class="color_red">*</span></td>
              <td><input type="text" v-model="patient.cname"/></td>
              <td>性别<span class="color_red">*</span></td>
              <td><select v-model="patient.sex">
                  <option></option>
                  <option>男</option>
                  <option>女</option>
                </select>
              </td>
              <td>年龄<span class="color_red">*</span></td>
              <td>
                <input type="text" class="reg_right_list_boxInput" v-model="patient.age"/>
                <select class="reg_right_list_boxSelect"  v-model="patient.ageunit">
                  <option>岁</option>
                  <option>月</option>
                  <option>日</option>
                </select>
              </td>
            </tr>
            <tr>
              <td>别名<span class="color_red">*</span></td>
              <td><input type="text" v-model="patient.ename"/></td>
              <td>联系电话</td>
              <td><input type="text" v-model="patient.tel"/></td>
              <td>身份证号</td>
              <td><input type="text" v-model="patient.ssid"/></td>
            </tr>
            <tr>
              <td>开单时间</td>
              <td><input type="date" v-model="patient.applytimeStr" max="9999-12-31"/></td>
              <td>开单科室</td>
              <td>
                <select v-model="patient.applydeptcode">
                  <option value=""></option>
                  <option v-for="dept in deptList" :value="dept.code">{{dept.name}}</option>
                </select>
              </td>
              <td>开单医生</td>
              <td>
                <select v-model="patient.applydoccode">
                  <option value=""></option>
                  <option v-for="user in userList" :value="user.code">{{user.name}}</option>
                </select>
              </td>
            </tr>
            <tr>
              <td>病区</td>
              <td><input type="text" v-model="patient.ward"/></td>
              <td>床号</td>
              <td><input type="text" v-model="patient.bednum"/></td>
              <td>住院日期</td>
              <td><input type="date" v-model="patient.inhostimeStr" max="9999-12-31"/></td>
            </tr>
            <tr>
              <td>申请单号</td>
              <td><input type="text" v-model="patient.applyno"/></td>
              <td>门诊号<span class="color_red">*</span></td>
              <td><input type="text" v-model="patient.clinicno"/></td>
              <td>住院号</td>
              <td><input type="text" v-model="patient.inhosno"/></td>
            </tr>
            <tr>
              <td>住院次数</td>
              <td><input type="text" v-model="patient.times"/></td>
              <td>紧急程度</td>
              <td><input type="text" v-model="patient.emergstatus"/></td>
              <td></td>
              <td></td>
            </tr>
          </table>
          <table class="reg_right_list_table line_height_30 reg_right_list_table2">
            <tr>
              <td>设备类型<span class="color_red">*</span></td>
              <td>
                <select v-model="patient.eqptypecode" @change="patient.eqpcode=''">
                  <option value=""></option>
                  <option v-for="type in eqptypeList" :value="type.code">{{type.name}}</option>
                </select>
              </td>
              <td>设备名称<span class="color_red">*</span></td>
              <td>
                <select v-model="patient.eqpcode">
                  <option value=""></option>
                  <option v-for="equip in equipList" :value="equip.code" v-if="equip.eqptypecode==patient.eqptypecode||patient.eqptypecode==''">{{equip.name}}</option>
                </select>
              </td>
              <td>影像号<span class="color_red">*</span></td>
              <td><input type="text" v-model="patient.accessno"/></td>
            </tr>
            <tr>
              <td>登记时间</td>
              <td><input type="date" v-model="patient.regtimeStr" readonly max="9999-12-31"/></td>
              <td>预约时间<span class="color_red">*</span></td>
              <td><input type="date" v-model="patient.ordertimeStr" max="9999-12-31"/></td>
              <td>患者类型</td>
              <td>
                <select v-model="patient.pattypecode">
                  <option value=""></option>
                  <option v-for="pattype in pattypeList" :value="pattype.code">{{pattype.name}}</option>
                </select>
              </td>
            </tr>
          </table>
          <table class="reg_right_list_table reg_right_list_table3 line_height_30">
            <tr>
              <td>医嘱信息</td>
              <td><input type="text" v-model="patient.docadvice"/></td>
              <td>临床诊断</td>
              <td><input type="text" v-model="patient.diagnosis"/></td>
            </tr>
            <tr>
              <td>提示信息</td>
              <td colspan="3"><textarea v-model="patient.notice"></textarea></td>
            </tr>
          </table>
          <ul class="reg_r_t_list line_height_20 clear">
            <li>收费项目</li>
            <li>
              <ul class="scroll2">
                <li v-for="feeitem in patient.feeitemList">{{feeitem.name}}</li>
              </ul>
            </li>
            <li>部位</li>
            <li>
              <ul class="scroll2">
                <li v-for="part in patient.partList">{{part.name}}</li>
              </ul>
            </li>
          </ul>
        </div>
        <div class="reg_right_btn">

          <button class="button bg_blur color_white" id="projectSite" @click="load">更改收费项目和部位</button>

          <div class="reg_r_btn_modal" ></div>
          <div class="reg_r_btn_modal_cont" >
            <div class="reg_modal_head line_height_40">
              <div>收费项目</div>
              <div>部位</div>
            </div>
            <div class="reg_table_modalBox">
              <div class="reg_table_modalBox_left">
                <!--<p>外部收费项目</p>-->
                <ul class="tree_down">
                  <li>
                    <!--<a>一级菜单</a>-->
                    <ul>
                      <li v-for="(fee,index) in feeitemList"><a @dblclick="addFee(fee)" :class="checkFeeitem(fee.code)?'disabled':''" v-if="fee.name.indexOf(searchFee)>=0&&fee.eqptypecode==patient.eqptypecode">{{fee.name}}</a></li>
                    </ul>
                  </li>
                </ul>
                <div class="reg_table_modalBox_foot">
                  <input type="text" v-model="searchFee"/>
                  <div class="clear">
                    <button v-for="(feeitem,index) in selectfee">{{feeitem.name}}<span @click="delFee(index)">X</span></button>
                  </div>
                </div>
              </div>
              <div class="reg_table_modalBox_right">
                <!--<p>外部部位</p>-->
                <ul class="tree_down">
                  <li v-for="(partgroup,index1) in partgroupList" v-if="checkPartgroup(index1)">
                    <a>{{partgroup.name}}</a>
                    <ul>
                      <li v-for="(part,index2) in partgroup.partList"><a @dblclick="addPart(part)" :class="checkPart(part.code)?'disabled':''" v-if="part.name.indexOf(searchPart)>=0">{{part.name}}</a></li>
                    </ul>
                  </li>
                </ul>

                <div class="reg_table_modalBox_foot">
                  <input type="text" v-model="searchPart"/>
                  <div class="clear">
                    <button v-for="(part,index) in selectpart">{{part.name}}<span @click="delPart(index)">X</span></button>
                  </div>
                </div>
              </div>
            </div>

            <div class="reg_r_btn_modal_c_fontBtn">
              <button class="button btn_yellow color_white" id="projectSiteCancel">取消&nbsp;&nbsp;&nbsp;X</button>
              <button class="button btn_green color_white" @click="yes">确定&nbsp;&nbsp;&nbsp;√</button>
            </div>
          </div>
        </div>
        <div class="reg_right_footBtn">
          <button class="button color_white btn_yellow btn_med" id="button_delete"  @click="deleteInfo"><p>删除<img src="../../../static/img/register/delete.png"/></p></button>
          <button class="button color_white btn_green btn_med" @click="clear"><p>新增<img src="../../../static/img/register/newadd.png"/></p></button>
          <button class="button color_white btn_blur btn_med" id="button_preservation" @click="updatePatinfo"><p>保存<img src="../../../static/img/register/preservation.png"/></p></button>
          <button class="button color_white bg_deepBlue btn_med"><p>阅片<img src="../../../static/img/register/yuep.png"/></p></button>
        </div>
      </div>
    </div>
  </div>
  </div>
</template>

<script>
  import Header from '@/components/Header/Header';
    export default {
      components: {
        'v-header': Header
      },
      created () {
        this.$http.get(window.localStorage.url+"/base/getEqptype")
          .then(function (res) {
            // console.log(res.data);
            if(res.data.status=='SUCCESS'){
              this.eqptypeList=res.data.data;
            }
          });

        this.$http.get(window.localStorage.url+"/base/getEquip")
          .then(function (res) {
            // console.log(res.data);
            if(res.data.status=='SUCCESS'){
              this.equipList=res.data.data;
            }
          });


        this.$http.get(window.localStorage.url+"/base/getPattype")
          .then(function (res) {
            // console.log(res.data);
            if(res.data.status=='SUCCESS'){
              this.pattypeList=res.data.data;
            }
          });

        this.$http.get(window.localStorage.url+"/base/getDept")
          .then(function (res) {
            // console.log(res.data);
            if(res.data.status=='SUCCESS'){
              this.deptList=res.data.data;
            }
          });

        this.$http.get(window.localStorage.url+"/base/getUser")
          .then(function (res) {
            // console.log(res.data);
            if(res.data.status=='SUCCESS'){
              this.userList=res.data.data;
            }
          });

        this.$http.get(window.localStorage.url+"/base/getFeeitem")
          .then(function (res) {
            // console.log(res.data);
            if(res.data.status=='SUCCESS'){
              this.feeitemList=res.data.data;
            }
          });

        this.$http.get(window.localStorage.url+"/base/getPartgroupPart")
          .then(function (res) {
            // console.log(res.data);
            if(res.data.status=='SUCCESS'){
              this.partgroupList=res.data.data;
            }
          });
      },
      data () {
        return {
          registered: false,
          // showModal:false,
          searchText:'',
          eqptypeList:[],
          equipList:[],
          pattypeList:[],
          deptList:[],
          userList:[],
          feeitemList:[],
          partgroupList:[],
          selectfee:[],
          selectpart:[],
          searchFee:"",
          searchPart:"",
          eqptype:{code:'',name:''},
          begintime:'',
          endtime:'',
          patInfoList:[],
          patBaseList:[],
          patient:{
            id:"",                                // 数据库主键
            cname:"",                              // 姓名
            sex:"",                               // 性别
            age:"",                               // 年龄
            ageunit:"岁",                           // 年龄单位
            ename:"",                             // 别名
            tel:"",                               // 联系电话
            ssid:"",                              // 身份证号
            applytimeStr:"",                         // 开单时间
            applydeptcode:"",                         // 开单科室
            applydoccode:"",                          // 开单医生
            ward:"",                              // 病区
            bednum:"",                            // 床号
            inhostimeStr:"",                         // 住院日期
            applyno:"",                           // 申请单号
            clinicno:"",                          // 门诊号
            inhosno:"",                           // 住院号
            times:"",                             // 住院次数
            emergstatus:"",                       // 紧急程度
            eqptypename:"",                       // 设备类型
            eqptypecode:"",                       // 设备类型
            eqpname:"",                           // 设备名称
            eqpcode:"",                           // 设备名称
            accessno:"",                          // 影像号
            regtimeStr:"",                           // 登记时间
            ordertimeStr:"",                         // 预约时间
            pattypecode:"",                       // 患者类型
            docadvice:"",                         // 医嘱信息
            diagnosis:"",                         // 临床诊断
            notice:"",                            // 提示信息
            statuscode:"",                            // 提示信息

            baseid:"",

            // 收费项目 部位
            feeitemList:[],
            partList:[]


          }
        }
      },
      methods: {
        search () {
          if(this.registered){
            this.search1();
          }else {
            this.search2();
          }
        },
        search1 () {
          // console.log('1111')
          //patinfo
          this.$http.get(window.localStorage.url+"/pat/searchPatInfo?begintime="+this.begintime+"&endtime="+this.endtime+"&eqptype="+this.eqptype.code+"&searchText="+this.searchText)
            .then(function (res) {
              if(res.data.status=='SUCCESS') {
                this.patInfoList = res.data.data;
                /*$pg.popup({
                  text:"查询成功",//显示的文本
//          bgColor:"#f1f1f1", //背景皮肤
                  btnClass:'reBtn',//确定按钮的类值  必传  方便查找确定按钮的class值
                  btnBgColor:'#4f56a3',//按钮的颜色
                  btnColor:'#fff',//按钮的字体颜色
                  btnToggle:{
                    btnDetermine:true,//确定按钮是否显示
                    btnCancel:false,//取消按钮是否显示
                  },
                  determine:function () {
                  }
                });*/
              }else {
                /*$pg.popup({
                  text:"查询失败",//显示的文本
//          bgColor:"#f1f1f1", //背景皮肤
                  btnClass:'reBtn',//确定按钮的类值  必传  方便查找确定按钮的class值
                  btnBgColor:'#4f56a3',//按钮的颜色
                  btnColor:'#fff',//按钮的字体颜色
                  btnToggle:{
                    btnDetermine:true,//确定按钮是否显示
                    btnCancel:false,//取消按钮是否显示
                  },
                  determine:function () {
                  }
                });*/
              }
              }
            );
        },
        search2 () {
          // console.log('2222')
          this.$http.get(window.localStorage.url+"/pat/searchPatBase?begintime="+this.begintime+"&endtime="+this.endtime+"&eqptype="+this.eqptype.name+"&searchText="+this.searchText)
            .then(function (res) {
              if(res.data.status=='SUCCESS') {
                this.patBaseList = res.data.data;
              }
              }
            );
        },
        getPatInfoById (id) {
          // console.log('2222')
          this.$http.get(window.localStorage.url+"/pat/getPatInfoById/"+id)
            .then(function (res) {
              if(res.data.status=='SUCCESS') {
                var patInfo=res.data.data;
                this.patient.id = patInfo.id===undefined?"":patInfo.id;
                this.patient.cname = patInfo.cname===undefined?"":patInfo.cname;
                this.patient.sex = patInfo.sex===undefined?"":patInfo.sex;
                this.patient.age = patInfo.age===undefined?"":patInfo.age;
                this.patient.ageunit = patInfo.ageunit===undefined?"":patInfo.ageunit;
                this.patient.ename = patInfo.ename===undefined?"":patInfo.ename;
                this.patient.tel = patInfo.tel===undefined?"":patInfo.tel;
                this.patient.ssid = patInfo.ssid===undefined?"":patInfo.ssid;
                this.patient.applytimeStr = patInfo.applytimeStr===undefined?"":patInfo.applytimeStr;
                this.patient.applydeptcode = patInfo.applydeptcode===undefined?"":patInfo.applydeptcode;
                this.patient.applydoccode = patInfo.applydoccode===undefined?"":patInfo.applydoccode;
                this.patient.ward = patInfo.ward===undefined?"":patInfo.ward;
                this.patient.bednum = patInfo.bednum===undefined?"":patInfo.bednum;
                this.patient.inhostimeStr = patInfo.inhostimeStr===undefined?"":patInfo.inhostimeStr;
                this.patient.applyno = patInfo.applyno===undefined?"":patInfo.applyno;
                this.patient.clinicno = patInfo.clinicno===undefined?"":patInfo.clinicno;
                this.patient.inhosno = patInfo.inhosno===undefined?"":patInfo.inhosno;
                this.patient.times = patInfo.times===undefined?"":patInfo.times;
                this.patient.emergstatus = patInfo.emergstatus===undefined?"":patInfo.emergstatus;
                this.patient.eqptypename = patInfo.eqptypename===undefined?"":patInfo.eqptypename;
                this.patient.eqptypecode = patInfo.eqptypecode===undefined?"":patInfo.eqptypecode;
                this.patient.eqpname = patInfo.eqpname===undefined?"":patInfo.eqpname;
                this.patient.eqpcode = patInfo.eqpcode===undefined?"":patInfo.eqpcode;
                this.patient.accessno = patInfo.accessno===undefined?"":patInfo.accessno;
                this.patient.regtimeStr = patInfo.regtimeStr===undefined?"":patInfo.regtimeStr;
                this.patient.ordertimeStr = patInfo.ordertimeStr===undefined?"":patInfo.ordertimeStr;
                this.patient.pattypecode = patInfo.pattypecode===undefined?"":patInfo.pattypecode;
                this.patient.docadvice = patInfo.docadvice===undefined?"":patInfo.docadvice;
                this.patient.diagnosis = patInfo.diagnosis===undefined?"":patInfo.diagnosis;
                this.patient.notice = patInfo.notice===undefined?"":patInfo.notice;
                this.patient.statuscode = patInfo.statuscode===undefined?"":patInfo.statuscode;
                this.patient.baseid = "";

                this.patient.feeitemList = patInfo.feeitemList===undefined?[]:patInfo.feeitemList;
                this.patient.partList = patInfo.partList===undefined?[]:patInfo.partList;
              }
              }
            );
        },
        getPatBaseById (id) {
          // console.log('2222')
          this.$http.get(window.localStorage.url+"/pat/getPatBaseById/"+id)
            .then(function (res) {
              if(res.data.status=='SUCCESS') {
                var patBase=res.data.data;
                this.patient.id = "";
                this.patient.cname = patBase.name===undefined?"":patBase.name;
                this.patient.sex = patBase.sex===undefined?"":patBase.sex;
                this.patient.age = patBase.age===undefined?"":patBase.age;
                this.patient.ageunit = patBase.ageunit===undefined?"":patBase.ageunit;
                this.patient.ename = patBase.ename===undefined?"":patBase.ename;
                this.patient.tel = patBase.tel===undefined?"":patBase.tel;
                this.patient.ssid = patBase.ssid===undefined?"":patBase.ssid;
                this.patient.applytimeStr = patBase.applytimeStr===undefined?"":patBase.applytimeStr;
                this.patient.applydeptcode = patBase.applydeptcode===undefined?"":patBase.applydeptcode;
                this.patient.applydoccode = patBase.applydoccode===undefined?"":patBase.applydoccode;
                this.patient.ward = patBase.ward===undefined?"":patBase.ward;
                this.patient.bednum = patBase.bednum===undefined?"":patBase.bednum;
                this.patient.inhostimeStr = patBase.inhostimeStr===undefined?"":patBase.inhostimeStr;
                this.patient.applyno = patBase.applyno===undefined?"":patBase.applyno;
                this.patient.clinicno = patBase.clinicno===undefined?"":patBase.clinicno;
                this.patient.inhosno = patBase.inhosno===undefined?"":patBase.inhosno;
                this.patient.times = patBase.times===undefined?"":patBase.times;
                this.patient.emergstatus = patBase.emergstatus===undefined?"":patBase.emergstatus;
                this.patient.eqptypename = patBase.eqptype===undefined?"":patBase.eqptype;
                this.patient.eqptypecode = patBase.eqptypecode===undefined?"":patBase.eqptypecode;
                this.patient.eqpname = patBase.eqpname===undefined?"":patBase.eqpname;
                this.patient.eqpcode = patBase.eqpcode===undefined?"":patBase.eqpcode;
                this.patient.accessno = patBase.accessno===undefined?"":patBase.accessno;
                this.patient.regtimeStr = patBase.regtimeStr===undefined?"":patBase.regtimeStr;
                this.patient.ordertimeStr = patBase.ordertimeStr===undefined?"":patBase.ordertimeStr;
                this.patient.pattypecode = patBase.pattypecode===undefined?"":patBase.pattypecode;
                this.patient.docadvice = patBase.docadvice===undefined?"":patBase.docadvice;
                this.patient.diagnosis = patBase.diagnosis===undefined?"":patBase.diagnosis;
                this.patient.notice = patBase.notice===undefined?"":patBase.notice;
                this.patient.statuscode = patBase.statuscode===undefined?"":patBase.statuscode;


                this.patient.feeitemList = patBase.feeitemList===undefined?[]:patBase.feeitemList;
                this.patient.partList = patBase.partList===undefined?[]:patBase.partList;

                this.patient.baseid = patBase.id===undefined?"":patBase.id;

              }
              }
            );
        },
        updatePatinfo(){

          var that=this;

          if(that.patient.cname==""){
            $pg.popup({
              text:"姓名不能为空",//显示的文本
//          bgColor:"#f1f1f1", //背景皮肤
              btnClass:'reBtn',//确定按钮的类值  必传  方便查找确定按钮的class值
              btnBgColor:'#4f56a3',//按钮的颜色
              btnColor:'#fff',//按钮的字体颜色
              btnToggle:{
                btnDetermine:true,//确定按钮是否显示
                btnCancel:false,//取消按钮是否显示
              },
              determine:function () {
              }
            });
            return false;
          }
          if(that.patient.sex==""){
            $pg.popup({
              text:"性别不能为空",//显示的文本
//          bgColor:"#f1f1f1", //背景皮肤
              btnClass:'reBtn',//确定按钮的类值  必传  方便查找确定按钮的class值
              btnBgColor:'#4f56a3',//按钮的颜色
              btnColor:'#fff',//按钮的字体颜色
              btnToggle:{
                btnDetermine:true,//确定按钮是否显示
                btnCancel:false,//取消按钮是否显示
              },
              determine:function () {
              }
            });
            return false;
          }
          if(that.patient.age==""){
            $pg.popup({
              text:"年龄不能为空",//显示的文本
//          bgColor:"#f1f1f1", //背景皮肤
              btnClass:'reBtn',//确定按钮的类值  必传  方便查找确定按钮的class值
              btnBgColor:'#4f56a3',//按钮的颜色
              btnColor:'#fff',//按钮的字体颜色
              btnToggle:{
                btnDetermine:true,//确定按钮是否显示
                btnCancel:false,//取消按钮是否显示
              },
              determine:function () {
              }
            });
            return false;
          }
          if(that.patient.ename==""){
            $pg.popup({
              text:"别名不能为空",//显示的文本
//          bgColor:"#f1f1f1", //背景皮肤
              btnClass:'reBtn',//确定按钮的类值  必传  方便查找确定按钮的class值
              btnBgColor:'#4f56a3',//按钮的颜色
              btnColor:'#fff',//按钮的字体颜色
              btnToggle:{
                btnDetermine:true,//确定按钮是否显示
                btnCancel:false,//取消按钮是否显示
              },
              determine:function () {
              }
            });
            return false;
          }
          if(that.patient.clinicno==""){
            $pg.popup({
              text:"门诊号不能为空",//显示的文本
//          bgColor:"#f1f1f1", //背景皮肤
              btnClass:'reBtn',//确定按钮的类值  必传  方便查找确定按钮的class值
              btnBgColor:'#4f56a3',//按钮的颜色
              btnColor:'#fff',//按钮的字体颜色
              btnToggle:{
                btnDetermine:true,//确定按钮是否显示
                btnCancel:false,//取消按钮是否显示
              },
              determine:function () {
              }
            });
            return false;
          }
          if(that.patient.eqptypecode==""){
            $pg.popup({
              text:"设备类型不能为空",//显示的文本
//          bgColor:"#f1f1f1", //背景皮肤
              btnClass:'reBtn',//确定按钮的类值  必传  方便查找确定按钮的class值
              btnBgColor:'#4f56a3',//按钮的颜色
              btnColor:'#fff',//按钮的字体颜色
              btnToggle:{
                btnDetermine:true,//确定按钮是否显示
                btnCancel:false,//取消按钮是否显示
              },
              determine:function () {
              }
            });
            return false;
          }
          if(that.patient.eqpcode==""){
            $pg.popup({
              text:"设备不能为空",//显示的文本
//          bgColor:"#f1f1f1", //背景皮肤
              btnClass:'reBtn',//确定按钮的类值  必传  方便查找确定按钮的class值
              btnBgColor:'#4f56a3',//按钮的颜色
              btnColor:'#fff',//按钮的字体颜色
              btnToggle:{
                btnDetermine:true,//确定按钮是否显示
                btnCancel:false,//取消按钮是否显示
              },
              determine:function () {
              }
            });
            return false;
          }
          if(that.patient.accessno==""){
            $pg.popup({
              text:"影像号不能为空",//显示的文本
//          bgColor:"#f1f1f1", //背景皮肤
              btnClass:'reBtn',//确定按钮的类值  必传  方便查找确定按钮的class值
              btnBgColor:'#4f56a3',//按钮的颜色
              btnColor:'#fff',//按钮的字体颜色
              btnToggle:{
                btnDetermine:true,//确定按钮是否显示
                btnCancel:false,//取消按钮是否显示
              },
              determine:function () {
              }
            });
            return false;
          }
          if(that.patient.ordertimeStr==""){
            $pg.popup({
              text:"预约时间不能为空",//显示的文本
//          bgColor:"#f1f1f1", //背景皮肤
              btnClass:'reBtn',//确定按钮的类值  必传  方便查找确定按钮的class值
              btnBgColor:'#4f56a3',//按钮的颜色
              btnColor:'#fff',//按钮的字体颜色
              btnToggle:{
                btnDetermine:true,//确定按钮是否显示
                btnCancel:false,//取消按钮是否显示
              },
              determine:function () {
              }
            });
            return false;
          }




          for(var i in that.equipList){
            if(that.patient.eqpcode==that.equipList[i].code){
              that.patient.eqpname=that.equipList[i].name;
              // console.log(this.equipList[i].name);
            }
          }

          for(var j in that.eqptypeList){
            if(that.patient.eqptypecode==that.eqptypeList[j].code){
              that.patient.eqptypename=that.eqptypeList[j].name;
            }
          }


          that.$http.post(window.localStorage.url+"/pat/updatePatInfo",that.patient).then(function (response) {
            console.log(response)
            if(response.data.status=="SUCCESS"){
              $pg.popup({
                text:"保存成功",//显示的文本
//          bgColor:"#f1f1f1", //背景皮肤
                btnClass:'reBtn',//确定按钮的类值  必传  方便查找确定按钮的class值
                btnBgColor:'#4f56a3',//按钮的颜色
                btnColor:'#fff',//按钮的字体颜色
                btnToggle:{
                  btnDetermine:true,//确定按钮是否显示
                  btnCancel:false,//取消按钮是否显示
                },
                determine:function () {
                  that.search1();
                  that.search2();
                  that.clear();
                }
              });
            }else {
              $pg.popup({
                text:response.data.message,//显示的文本
//          bgColor:"#f1f1f1", //背景皮肤
                btnClass:'reBtn',//确定按钮的类值  必传  方便查找确定按钮的class值
                btnBgColor:'#4f56a3',//按钮的颜色
                btnColor:'#fff',//按钮的字体颜色
                // height:'200',
                btnToggle:{
                  btnDetermine:true,//确定按钮是否显示
                  btnCancel:false,//取消按钮是否显示
                },
                determine:function () {
                }
              });
            }
          })
        },
        clear(){
          this.patient={
            id:"",                                // 数据库主键
            cname:"",                              // 姓名
            sex:"",                               // 性别
            age:"",                               // 年龄
            ageunit:"",                           // 年龄单位
            ename:"",                             // 别名
            tel:"",                               // 联系电话
            ssid:"",                              // 身份证号
            applytimeStr:"",                         // 开单时间
            applydeptcode:"",                         // 开单科室
            applydoccode:"",                          // 开单医生
            ward:"",                              // 病区
            bednum:"",                            // 床号
            inhostimeStr:"",                         // 住院日期
            applyno:"",                           // 申请单号
            clinicno:"",                          // 门诊号
            inhosno:"",                           // 住院号
            times:"",                             // 住院次数
            emergstatus:"",                       // 紧急程度
            eqptypename:"",                       // 设备类型
            eqptypecode:"",                       // 设备类型
            eqpname:"",                           // 设备名称
            eqpcode:"",                           // 设备名称
            accessno:"",                          // 影像号
            regtimeStr:"",                           // 登记时间
            ordertimeStr:this.formatday(new Date()),                         // 预约时间
            pattypecode:"",                       // 患者类型
            docadvice:"",                         // 医嘱信息
            diagnosis:"",                         // 临床诊断
            notice:"",                            // 提示信息
            statuscode:"",                            // 提示信息

            baseid:"",

            // 收费项目 部位
            feeitemList:[],
            partList:[]
          };
        },
        checkPart (code){
          // for(var i in this.patient.partList){
          for(var i in this.selectpart){
            // if(this.patient.partList[i].code==code){
            if(this.selectpart[i].code==code){
              return true;
            }
          }
          return false;
        },
        checkPartgroup (index){
          // for(var i in this.patient.partList){
          // var flag=false;
          for(var i in this.partgroupList[index].partList){
            if(this.partgroupList[index].partList[i].name.indexOf(this.searchPart)>=0){
              return true;
            }
          }
          return false;
        },
        checkFeeitem (code){
          // for(var i in this.patient.feeitemList){
          for(var i in this.selectfee){
            // if(this.patient.feeitemList[i].code==code){
            if(this.selectfee[i].code==code){
              return true;
            }
          }
          return false;
        },
        addFee(fee){
          if(!this.checkFeeitem(fee.code)) {
            // this.patient.feeitemList.splice(this.patient.feeitemList.length, 0, fee);
            this.selectfee.splice(this.selectfee.length, 0, fee);
          }
        },
        delFee(index){
          // this.patient.feeitemList.splice(index,1);
          this.selectfee.splice(index,1);

        },
        addPart(part){
          if(!this.checkPart(part.code)) {
            // this.patient.partList.splice(this.patient.partList.length, 0, part);
            this.selectpart.splice(this.selectpart.length, 0, part);
          }
        },
        delPart(index){
          // this.patient.partList.splice(index,1);
          this.selectpart.splice(index,1);

        },
        deleteInfo(){
          var id=this.patient.id;
          var that=this;
          if(id==""){
            $pg.popup({
              text: "删除失败",//显示的文本
//          bgColor:"#f1f1f1", //背景皮肤
              btnClass: 'reBtn',//确定按钮的类值  必传  方便查找确定按钮的class值
              btnBgColor: '#4f56a3',//按钮的颜色
              btnColor: '#fff',//按钮的字体颜色
              btnToggle: {
                btnDetermine: true,//确定按钮是否显示
                btnCancel: false,//取消按钮是否显示
              },
              determine: function () {
              }
            });
          }else {
            $pg.popup({
              text: "确定要删除吗？",//显示的文本
//          bgColor:"#f1f1f1", //背景皮肤
              btnClass: 'reBtn',//确定按钮的类值  必传  方便查找确定按钮的class值
              btnBgColor: '#4f56a3',//按钮的颜色
              btnColor: '#fff',//按钮的字体颜色
              btnToggle: {
                btnDetermine: true,//确定按钮是否显示
                btnCancel: true,//取消按钮是否显示
              },
              determine: function () {
                that.$http.get(window.localStorage.url + "/pat/deletePatInfoById/" + id)
                  .then(function (res) {
                    if (res.data.status == "SUCCESS") {
                      $pg.popup({
                        text: "删除成功",//显示的文本
//          bgColor:"#f1f1f1", //背景皮肤
                        btnClass: 'reBtn',//确定按钮的类值  必传  方便查找确定按钮的class值
                        btnBgColor: '#4f56a3',//按钮的颜色
                        btnColor: '#fff',//按钮的字体颜色
                        btnToggle: {
                          btnDetermine: true,//确定按钮是否显示
                          btnCancel: false,//取消按钮是否显示
                        },
                        determine: function () {
                          that.search1();
                          that.search2();
                        }
                      });
                    } else {
                      $pg.popup({
                        text: "删除失败",//显示的文本
//          bgColor:"#f1f1f1", //背景皮肤
                        btnClass: 'reBtn',//确定按钮的类值  必传  方便查找确定按钮的class值
                        btnBgColor: '#4f56a3',//按钮的颜色
                        btnColor: '#fff',//按钮的字体颜色
                        btnToggle: {
                          btnDetermine: true,//确定按钮是否显示
                          btnCancel: false,//取消按钮是否显示
                        },
                        determine: function () {
                        }
                      });
                    }
                  });
              }
            });
          }
        },
        yes(){
          // this.patient.partList=this.selectpart;
          // this.patient.feeitemList=this.selectfee;

          this.patient.feeitemList=[];
          for(var i in this.selectfee){
            this.patient.feeitemList[i]=this.selectfee[i];
          }

          this.patient.partList=[];
          for(var i in this.selectpart){
            this.patient.partList[i]=this.selectpart[i];
          }

          $('.reg_r_btn_modal').hide();
          $('.reg_r_btn_modal_cont').animate({
            width:'0',
            height:'0',
            opacity:'0'
          },200);
        },
        load(){
          // this.showModal=true;
          this.selectfee=[];
          for(var i in this.patient.feeitemList){
            this.selectfee[i]=this.patient.feeitemList[i];
          }
          // this.selectfee=this.patient.feeitemList;
          // this.selectpart=this.patient.partList;
          this.selectpart=[];
          for(var i in this.patient.partList){
            this.selectpart[i]=this.patient.partList[i];
          }
        },
        formatday(date) {
          var seperator1 = "-";
          var month = date.getMonth() + 1;
          var strDate = date.getDate();
          if (month >= 1 && month <= 9) {
            month = "0" + month;
          }
          if (strDate >= 0 && strDate <= 9) {
            strDate = "0" + strDate;
          }
          var dateStr = date.getFullYear() + seperator1 + month + seperator1 + strDate
          return dateStr;
        }
      },
      mounted(){
        var that=this;
        function height() {
          var winHeight = $(window).height();
          winHeight = (winHeight - 677) / 1.2;
          winHeight = winHeight < 0 ? 0 : winHeight;
          // console.log(winHeight);
          $('.reg_table_cont_html ').css({
            height:(336+winHeight)+'px',
          });
          // console.log($('.reg_table_cont_html').css('height'))
          $('.reg_r_t_list>li ul').css({
            height:60+winHeight/1.2+'px'
          });
        }

        $(window).resize = function(){
          height();
        };
        height();

/*        window.onresize = function(){
          height();
        };*/

//    项目部位按钮
        $('#projectSite').click(function () {
          // that.load();
          $('.reg_r_btn_modal').show();
          $('.reg_r_btn_modal_cont').animate({
            width:'800px',
            height:'470px',
            opacity:'1'
          },200);
        })
        //项目部位里面的取消按钮
        $('#projectSiteCancel').click(function () {
          $('.reg_r_btn_modal').hide();
          $('.reg_r_btn_modal_cont').animate({
            width:'0',
            height:'0',
            opacity:'0'
          },200);
        })

        $(".reg_right_btn").bind("click",function(e){
          if( $('.reg_r_btn_modal').is(':hidden')){
            return false;
          }else {
            var target = $(e.target);
            if (target.closest(".reg_r_btn_modal_cont").length == 0 && target.closest("#projectSite").length == 0) {
              $('.reg_r_btn_modal').hide();
              $('.reg_r_btn_modal_cont').animate({
                width: '0',
                height: '0',
                opacity: '0'
              }, 200);
            }
          }
        });

      }
    }
</script>

<style scoped>
  /*内容*/
  .ris_cont_head{
    height: 26px;
    width: 96%;
    background-color: #e5e5e5;
    color: #3f3f3f;
    line-height: 26px;
    margin-top: 50px;
    min-width: 1300px;
    padding: 0 2%;
  }
  .ris_cont_head_left{
    float: left;
    width: 40%;
  }
  .ris_cont_head_left p{
    display: inline-block;
    padding:0 30px;
  }
  .ris_cont_head_right{
    float: right;
    width: 40%;
    text-align: right;
  }
  .ris_cont_head_right p{
    display: inline-block;
    padding:0 30px;
  }




  /*左边*/
  .reg_left{
    width: 40%;
    float: left;
    border: 1px solid #eee;
  }
  .ref_left_top{
    width: 100%;
    height: 36px;
    position: relative;
  }
  .ref_left_top p{
    position: absolute;
    height: 2px;
    width: 86%;
    top: 17px;
    left: 7%;
    z-index: 1;
    background: #57c8e6;
  }
  .ref_left_top span{
    display: inline-block;
    background: #fff;
    padding: 0 20px;
    line-height: 36px;
    z-index: 2;
    position: absolute;
    font-size: 16px;
    left: 43%;
    top: 0%;
    font-weight: bold;
  }

  /*table页*/
  .reg_tablePage{
    width: 90%;
    height: 34px;
    line-height: 34px;
    margin-left: 5%;
  }
  .reg_tablePage li{
    width: 48%;
    box-sizing: border-box;
    -webkit-box-sizing: border-box;
    border-bottom: 2px solid #ff8500;
    margin: 0 1%;
    position: relative;
  }
  .table_page>li img{
    display: none;
    width: 14px;
  }
  .table_page>li.table_page_active>img{
    display: block;
    position: absolute;
    left: 47%;
    top: 34px;
  }
  /*搜索栏*/
  .reg_search{
    width: 90%;
    margin: 10px auto 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid #ddd;
  }
  .reg_search input[type=date]{
    width: 100%;
  }
  .reg_search_table{
    width: 100%;
  }
  .reg_search_table tr td{
    height: 36px;
    position: relative;
  }
  .reg_search_table tr td:nth-child(1){width: 14%;}
  .reg_search_table tr td:nth-child(2){width: 38%;}
  .reg_search_table tr td:nth-child(3){width: 10%;text-align: center}
  .reg_search_table tr td:nth-child(4){width: 38%;}

  .reg_search_select{
    width: 30%;
  }
  .reg_search_input{
    width: 65%;
    float: right;
    padding-right: 32px;
  }
  .reg_search_table tr td input,.reg_search_table tr td select{
    border: 1px solid #88ada6;
    color: #587770;
  }
  .fdj_search{
    position: absolute;
    right: 8px;
    bottom: 10px;
    width: 16px;
    border-left: 1px solid #88ada6;
    padding-left: 5px;
  }
  /*table列表*/
  .reg_table_cont tr{
    border-bottom: 1px solid #ddd;
  }
  .reg_table_cont th{
    background: #b1b1b1;
    color: #fff;
  }
  .reg_table_cont_html{
    height: 430px;
    overflow: auto;
  }
  .reg_table_cont_html tr{
    border-bottom: 1px solid #ddd;
  }
  .reg_table_cont tr th:nth-child(1),.reg_table_cont_html tr td:nth-child(1){width: 14%}
  .reg_table_cont tr th:nth-child(2),.reg_table_cont_html tr td:nth-child(2){width: 8%}
  .reg_table_cont tr th:nth-child(3),.reg_table_cont_html tr td:nth-child(3){width: 8%}
  .reg_table_cont tr th:nth-child(4),.reg_table_cont_html tr td:nth-child(4){width: 20%}
  .reg_table_cont tr th:nth-child(5),.reg_table_cont_html tr td:nth-child(5){width: 20%}
  .reg_table_cont tr th:nth-child(6),.reg_table_cont_html tr td:nth-child(6){width: 10%}
  .reg_table_cont tr th:nth-child(7),.reg_table_cont_html tr td:nth-child(7){width: 20%}


  /*右边*/
  .reg_right{
    width: 57%;
    float: right;
    /*border: 1px solid #fa0002;*/
    margin: 15px 0 0 0;
  }
  .reg_right_head{
    background: #d7dbe6;
    line-height: 34px;
    font-size: 16px;
    font-weight: bold;
    box-sizing: border-box;
    padding-left: 30px;
    -webkit-box-sizing: border-box;
  }

  .reg_right_list{
    width: 100%;
  }
  .reg_right_list_table{
    width: 100%;
    border-bottom: 1px solid #ddd;
  }
  .reg_right_list_table tr td:nth-child(1){width: 10%;}
  .reg_right_list_table tr td:nth-child(2){width: 23.33%;}
  .reg_right_list_table tr td:nth-child(3){width: 10%;}
  .reg_right_list_table tr td:nth-child(4){width: 23.33%;}
  .reg_right_list_table tr td:nth-child(5){width: 10%;}
  .reg_right_list_table tr td:nth-child(6){width: 23.33%;}
  .reg_right_list_table tr td:nth-child(odd){
    box-sizing: border-box;
    -webkit-box-sizing: border-box;
    padding: 0 10px;
    text-align: justify;
    text-align-last: justify;
  }
  .reg_right_list_table tr td input,.reg_right_list_table tr td select{
    width: 100%;
    display: block;
  }
  .reg_right_list_table tr td input.reg_right_list_boxInput{
    width: 70%;
    float: left;
  }
  .reg_right_list_table tr td select.reg_right_list_boxSelect{
    width: 30%;
    float: left;
  }
  .reg_right_list_table2 input,.reg_right_list_table2 select{
    border: 1px solid #88ada5;
    color: #42544e;
  }
  .reg_right_list_table3 input,.reg_right_list_table3 select,.reg_right_list_table3 textarea{
    border: 1px solid #4c8dad;
    color: #42544e;
    width: 100%;
  }
  .reg_right_list_table3 textarea{
    height: 40px;
  }
  .reg_right_list_table3 tr td:nth-child(1){width: 10% !important;}
  .reg_right_list_table3 tr td:nth-child(2){width: 40% !important;}
  .reg_right_list_table3 tr td:nth-child(3){width: 10% !important;}
  .reg_right_list_table3 tr td:nth-child(4){width: 40% !important;}

  .reg_r_t_list{
    width: 100%;
    padding-top: 10px;
  }
  .reg_r_t_list>li{
    float: left;
    display: inline-block;
  }
  .reg_r_t_list>li:nth-child(1){
    width: 8%;
    padding: 0 10px;
    text-align: justify;
    text-align-last: justify;
  }
  .reg_r_t_list>li:nth-child(2){width: 25%;}
  .reg_r_t_list>li:nth-child(3){
    width: 8%;
    padding: 0 15px;
    text-align: justify;
    text-align-last: justify;
  }
  .reg_r_t_list>li:nth-child(4){width: 25%;}
  .reg_r_t_list>li ul{
    width: 100%;
    border: 1px solid #4c8caf;
    border-radius: 5px;
    height: 60px;
    overflow: auto;
  }
  .reg_r_t_list>li ul li{
    padding:2px 5px ;
  }
  /*按钮*/
  .reg_right_btn{
    width: 100%;
    text-align: right;
    /*padding-top: 10px;*/
    position: relative;
  }
  .reg_right_btn>button{
    width: 150px;
    height: 30px;
    border: 0;
  }
  .reg_r_btn_modal{
    position: fixed;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    /*background: rgba(0,0,0,.5);*/
    z-index: 3000;
    display: none;
  }
  .reg_r_btn_modal_cont{
    position: absolute;
    right: 0px;
    bottom: 30px;
    /*width: 800px;
    height: 470px;*/
    background: #fff;
    z-index: 3001;
    text-align: left;
    width: 0;
    height: 0;
    overflow: hidden;
    border: 1px solid #eee;
    opacity: 0;
  }


  /*右下底部按钮*/
  .reg_right_footBtn{
    text-align: right;
    margin-top: 20px;
  }
  .reg_right_footBtn button{
    border: 0;
    margin-right: 20px;
    position: relative;
    width: 110px;
    height: 36px;
  }
  .reg_right_footBtn button p{
    display: inline-block;
  }
  .reg_right_footBtn button img{
    height: 20px;
    position: absolute;
    right: 20px;
    top: 7px;
  }
  .reg_modal_head{
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    height: 40px;
    border-radius: 10px 10px 0 0;
  }
  .reg_modal_head>div{
    float: left;
    width: 50%;
    padding-left: 20px;
    box-sizing: border-box;
    -webkit-box-sizing: border-box;
    background: #727272;
    border-radius: 10px 10px 0 0;
  }
  .reg_modal_head>div:nth-child(1){
    border-right:1px solid #eee;
  }
  .reg_table_modalBox{
    width: 100%;
    height: 380px;
  }
  .reg_table_modalBox_left{
    width: 50%;
    float: left;
    border-right: 1px solid #ddd;
    height: 100%;
    box-sizing: border-box;
    border-bottom: 1px solid #ddd;
  }

  .reg_table_modalBox_left>ul,.reg_table_modalBox_right>ul{
    width: 100%;
    margin: 0 auto;
    height: 275px;
    border: 1px solid #eee;
    overflow: auto;
    box-sizing: border-box;
    line-height: 30px;
  }
  .reg_table_modalBox_left>ul>li>a,.reg_table_modalBox_right>ul>li>a{
    background: #999;
    color: #fff;
  }
  .reg_table_modalBox_left>ul>li a,.reg_table_modalBox_right>ul>li a{
    border-bottom: 1px solid #ddd;
    box-sizing: border-box;
    cursor: pointer;
  }
  .reg_table_modalBox_left>ul>li a.disabled,.reg_table_modalBox_right>ul>li a.disabled{
    background: #f3f3f3 !important;
    cursor: inherit;
  }


  .reg_table_modalBox_right{
    width: 50%;
    float: left;
    border-bottom: 1px solid #ddd;
    height: 100%;
    box-sizing: border-box;
  }

  .reg_table_modalBox_foot{
    width: 100%;
    height: 70px;
    /*border: 1px solid red;*/
  }
  .reg_table_modalBox_foot>input{
    width: 100%;
    height: 30px;
    margin: 2.5px 0;
  }
  .reg_table_modalBox_foot>div{
    width: 100%;
    height: 62px;
    overflow: auto;
    /*border: 1px solid red;*/
  }
  .reg_table_modalBox_foot>div button{
    display: inline-block;
    float: left;
    margin: 5px 3px 0;
    background: #4f90c2;
    color: #fff;
    border-radius: 5px;
    height: 26px;
    padding: 2px 10px;
    border: 0;
    position: relative;
  }
  .reg_table_modalBox_foot>div button>span{
    position: absolute;
    right: -4px;
    top: -4px;
    width: 16px;
    height: 16px;
    background: #fa5956;
    color: #fff;
    border-radius: 8px;
    line-height: 16px;
    cursor: pointer;
  }
  .reg_table_modalBox_foot>div button>span:hover{
    background: #fa1f1c;
  }





  .reg_r_btn_modal_c_fontBtn{
    text-align: right;
  }
  .reg_r_btn_modal_c_fontBtn button{
    border-radius: 5px;
    margin-right: 40px;
    margin-top: 10px;
  }

/*
  !*左边*!
  .reg_left{
    width: 40%;
    float: left;
    border: 1px solid #eee;
  }
  .ref_left_top{
    width: 100%;
    height: 36px;
    position: relative;
  }
  .ref_left_top p{
    position: absolute;
    height: 2px;
    width: 86%;
    top: 17px;
    left: 7%;
    z-index: 1;
    background: #57c8e6;
  }
  .ref_left_top span{
    display: inline-block;
    background: #fff;
    padding: 0 20px;
    line-height: 36px;
    z-index: 2;
    position: absolute;
    font-size: 16px;
    left: 43%;
    top: 0%;
    font-weight: bold;
  }

  !*table页*!
  .reg_tablePage{
    width: 90%;
    height: 34px;
    line-height: 34px;
    margin-left: 5%;
  }
  .reg_tablePage li{
    width: 48%;
    box-sizing: border-box;
    -webkit-box-sizing: border-box;
    border-bottom: 2px solid #ff8500;
    margin: 0 1%;
    position: relative;
  }
  .table_page>li img{
    display: none;
    width: 14px;
  }
  .table_page>li.table_page_active>img{
    display: block;
    position: absolute;
    left: 47%;
    top: 34px;
  }
  !*搜索栏*!
  .reg_search{
    width: 90%;
    margin: 10px auto 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid #ddd;
  }
  .reg_search input[type=date]{
    width: 100%;
  }
  .reg_search_table{
    width: 100%;
  }
  .reg_search_table tr td{
    height: 36px;
    position: relative;
  }
  .reg_search_table tr td:nth-child(1){width: 14%;}
  .reg_search_table tr td:nth-child(2){width: 38%;}
  .reg_search_table tr td:nth-child(3){width: 10%;text-align: center}
  .reg_search_table tr td:nth-child(4){width: 38%;}

  .reg_search_select{
    width: 30%;
  }
  .reg_search_input{
    width: 65%;
    float: right;
    padding-right: 32px;
  }
  .reg_search_table tr td input,.reg_search_table tr td select{
    border: 1px solid #88ada6;
    color: #587770;
  }
  .fdj_search{
    position: absolute;
    right: 8px;
    bottom: 10px;
    width: 16px;
    border-left: 1px solid #88ada6;
    padding-left: 5px;
  }
  !*table列表*!
  .reg_table_cont tr{
    border-bottom: 1px solid #ddd;
  }
  .reg_table_cont th{
    background: #b1b1b1;
    color: #fff;
  }
  .reg_table_cont_html{
    height: 430px;
    overflow: auto;
  }
  .reg_table_cont_html tr{
    border-bottom: 1px solid #ddd;
  }
  .reg_table_cont tr th:nth-child(1),.reg_table_cont_html tr td:nth-child(1){width: 14%}
  .reg_table_cont tr th:nth-child(2),.reg_table_cont_html tr td:nth-child(2){width: 8%}
  .reg_table_cont tr th:nth-child(3),.reg_table_cont_html tr td:nth-child(3){width: 8%}
  .reg_table_cont tr th:nth-child(4),.reg_table_cont_html tr td:nth-child(4){width: 20%}
  .reg_table_cont tr th:nth-child(5),.reg_table_cont_html tr td:nth-child(5){width: 20%}
  .reg_table_cont tr th:nth-child(6),.reg_table_cont_html tr td:nth-child(6){width: 10%}
  .reg_table_cont tr th:nth-child(7),.reg_table_cont_html tr td:nth-child(7){width: 20%}


  !*右边*!
  .reg_right{
    width: 57%;
    float: right;
    !*border: 1px solid #fa0002;*!
    margin: 15px 0 0 0;
  }
  .reg_right_head{
    background: #d7dbe6;
    line-height: 34px;
    font-size: 16px;
    font-weight: bold;
    box-sizing: border-box;
    padding-left: 30px;
    -webkit-box-sizing: border-box;
  }

  .reg_right_list{
    width: 100%;
  }
  .reg_right_list_table{
    width: 100%;
    border-bottom: 1px solid #ddd;
  }
  .reg_right_list_table tr td:nth-child(1){width: 10%;}
  .reg_right_list_table tr td:nth-child(2){width: 23.33%;}
  .reg_right_list_table tr td:nth-child(3){width: 10%;}
  .reg_right_list_table tr td:nth-child(4){width: 23.33%;}
  .reg_right_list_table tr td:nth-child(5){width: 10%;}
  .reg_right_list_table tr td:nth-child(6){width: 23.33%;}
  .reg_right_list_table tr td:nth-child(odd){
    box-sizing: border-box;
    -webkit-box-sizing: border-box;
    padding: 0 10px;
    text-align: justify;
    text-align-last: justify;
  }
  .reg_right_list_table tr td input,.reg_right_list_table tr td select{
    width: 100%;
    display: block;
  }
  .reg_right_list_table tr td input.reg_right_list_boxInput{
    width: 70%;
    float: left;
  }
  .reg_right_list_table tr td select.reg_right_list_boxSelect{
    width: 30%;
    float: left;
  }
  .reg_right_list_table2 input,.reg_right_list_table2 select{
    border: 1px solid #88ada5;
    color: #42544e;
  }
  .reg_right_list_table3 input,.reg_right_list_table3 select,.reg_right_list_table3 textarea{
    border: 1px solid #4c8dad;
    color: #42544e;
    width: 100%;
  }
  .reg_right_list_table3 textarea{
    height: 40px;
  }
  .reg_right_list_table3 tr td:nth-child(1){width: 10% !important;}
  .reg_right_list_table3 tr td:nth-child(2){width: 40% !important;}
  .reg_right_list_table3 tr td:nth-child(3){width: 10% !important;}
  .reg_right_list_table3 tr td:nth-child(4){width: 40% !important;}

  .reg_r_t_list{
    width: 100%;
    padding-top: 10px;
  }
  .reg_r_t_list>li{
    float: left;
    display: inline-block;
  }
  .reg_r_t_list>li:nth-child(1){
    width: 8%;
    padding: 0 10px;
    text-align: justify;
    text-align-last: justify;
  }
  .reg_r_t_list>li:nth-child(2){width: 25%;}
  .reg_r_t_list>li:nth-child(3){
    width: 8%;
    padding: 0 15px;
    text-align: justify;
    text-align-last: justify;
  }
  .reg_r_t_list>li:nth-child(4){width: 25%;}
  .reg_r_t_list>li ul{
    width: 100%;
    border: 1px solid #4c8caf;
    border-radius: 5px;
    height: 80px;
    overflow: auto;
  }
  .reg_r_t_list>li ul li{
    padding:2px 5px ;
  }
  !*按钮*!
  .reg_right_btn{
    width: 100%;
    text-align: right;
    padding-top: 10px;
    position: relative;
  }
  .reg_right_btn>button{
    width: 150px;
    height: 30px;
    border: 0;
  }
  .reg_r_btn_modal{
    position: fixed;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    !*background: rgba(0,0,0,.5);*!
    z-index: 3000;
    display: none;
  }
  .reg_r_btn_modal_cont{
    position: absolute;
    right: 0px;
    bottom: 30px;
    !*width: 800px;*!
    !*height: 470px;*!
    background: #fff;
    z-index: 3001;
    text-align: left;
    width: 0;
    height: 0;
    overflow: hidden;
    border: 1px solid #eee;
    opacity: 0;
  }


  !*右下底部按钮*!
  .reg_right_footBtn{
    text-align: right;
    margin-top: 25px;
  }
  .reg_right_footBtn button{
    border: 0;
    margin-right: 20px;
    position: relative;
    width: 110px;
    height: 36px;
  }
  .reg_right_footBtn button p{
    display: inline-block;
  }
  .reg_right_footBtn button img{
    height: 20px;
    position: absolute;
    right: 20px;
    top: 7px;
  }
  .reg_modal_head{
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    height: 40px;
    border-radius: 10px 10px 0 0;
  }
  .reg_modal_head>div{
    float: left;
    width: 50%;
    padding-left: 20px;
    box-sizing: border-box;
    -webkit-box-sizing: border-box;
    background: #727272;
    border-radius: 10px 10px 0 0;
  }
  .reg_modal_head>div:nth-child(1){
    border-right:1px solid #eee;
  }
  .reg_table_modalBox{
    width: 100%;
    height: 380px;
  }
  .reg_table_modalBox_left{
    width: 50%;
    float: left;
    border-right: 1px solid #ddd;
    height: 100%;
    box-sizing: border-box;
    border-bottom: 1px solid #ddd;
  }

  .reg_table_modalBox_left>ul,.reg_table_modalBox_right>ul{
    width: 100%;
    margin: 0 auto;
    height: 275px;
    border: 1px solid #eee;
    overflow: auto;
    box-sizing: border-box;
    line-height: 30px;
  }
  .reg_table_modalBox_left>ul>li>a,.reg_table_modalBox_right>ul>li>a{
    background: #999;
    color: #fff;
  }
  .reg_table_modalBox_left>ul>li a,.reg_table_modalBox_right>ul>li a{
    border-bottom: 1px solid #ddd;
    box-sizing: border-box;
    cursor: pointer;
  }


  .reg_table_modalBox_right{
    width: 50%;
    float: left;
    border-bottom: 1px solid #ddd;
    height: 100%;
    box-sizing: border-box;
  }

  .reg_table_modalBox_foot{
    width: 100%;
    height: 70px;
    !*border: 1px solid red;*!
  }
  .reg_table_modalBox_foot>input{
    width: 100%;
    height: 30px;
    margin: 2.5px 0;
  }
  .reg_table_modalBox_foot>div{
    width: 100%;
    height: 62px;
    overflow: auto;
    !*border: 1px solid red;*!
  }
  .reg_table_modalBox_foot>div button{
    display: inline-block;
    float: left;
    margin: 5px 3px 0;
    background: #4f90c2;
    color: #fff;
    border-radius: 5px;
    height: 26px;
    padding: 2px 10px;
    border: 0;
    position: relative;
  }
  .reg_table_modalBox_foot>div button>span{
    position: absolute;
    right: -4px;
    top: -4px;
    width: 16px;
    height: 16px;
    background: #fa5956;
    color: #fff;
    border-radius: 8px;
    line-height: 16px;
    cursor: pointer;
  }
  .reg_table_modalBox_foot>div button>span:hover{
    background: #fa1f1c;
  }





  .reg_r_btn_modal_c_fontBtn{
    text-align: right;
  }
  .reg_r_btn_modal_c_fontBtn button{
    border-radius: 5px;
    margin-right: 40px;
    margin-top: 10px;
  }
*/

</style>
